<!DOCTYPE html>
<html>

{include file='public/header'}

<body>
    <div class="x-nav">
        <span class="layui-breadcrumb">
            <a href="javascript:void(0)">首页</a>
            <a href="javascript:void(0)">回传</a>
            <a><cite>已回传数据</cite></a>
        </span>
        <a class="layui-btn layui-btn-small" id="reload" title="刷新">
            <i class="layui-icon" style="line-height:30px"><i class="iconfont">&#xe6aa;</i></i>
        </a>
    </div>
    <div class="x-body">
        <div class="layui-row">
            <form class="layui-form">

                <div class="layui-inline">
                    <label class="layui-form-label w-auto">账户ID：</label>
                    <div class="layui-input-inline" >
                        <input type="text" name="account_id" placeholder="请输入账户ID" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <button class="layui-btn" style="margin-left: 10px;" lay-submit lay-filter="searchList">搜索</button>
                <button type="reset" id="resetList" class="layui-btn layui-btn-primary">重置</button>
            </form>
        </div>
        <table id="list" lay-filter="list"></table>
    </div>

    <script type="text/html" id="toolbar">
        <div class="layui-btn-container">
            <button class="layui-btn layui-btn-sm" lay-event="add">创建数据源ID</button>
        </div>
    </script>
    <script>
        let params = {
            elem: '#list'
            , toolbar: '#toolbar'
            , url: '/cps/tencent/list' //数据接口
            , id: 'list'
            , limit:15
            , page:true
            , cols: [[ //表头
                { field: 'source_id', title: '数据源ID' , align:'center' }
                , { field: 'account_id', title: '账户ID', align:'center'}
                , { field: 'type', title: '类型', align:'center'}
                , { field: 'responsibility_person_name', title: '投手名称', align:'center'}
                , { field: 'applet_name', title: '小程序名称', align:'center'}
                , { field: 'name', title: '用户行为源名称', align:'center'}
                , { field: 'created_time', title: '添加时间', align:'center'}
            ]]
        }
        tableList(params)
        layui.use('table', function () {
            var table = layui.table;
            table.on('toolbar(list)', function (obj) {
                var event = obj.event;
                if (event === 'add') {
                    x_admin_show('添加', './info.html', 650, 500);
                }
            });

        });
    </script>
</body>

</html>